﻿namespace EAL
{
    using System;
    using System.IO;
    using System.Windows;

    /// <summary>
    /// Interaktionslogik für AcceptLicence.xaml
    /// </summary>
    public partial class AcceptLicence : Window
    {
        public AcceptLicence()
        {
            InitializeComponent();
            readLicence();
        }

        /// <summary>
        /// readLicence - Method
        /// </summary>
        public void readLicence()
        {
            String licenceText;
            using (StreamReader stream = new StreamReader(File.OpenRead(Environment.CurrentDirectory + "/Resources/Licence.txt")))
            {
                licenceText = stream.ReadToEnd();
            }

            licenseBox.AppendText(licenceText);
             
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            this.Close();
        }
    }
}
